package cn.lzj.system.service.impl;

import cn.lzj.basic.service.impl.BaseServiceImpl;
import cn.lzj.system.domain.SystemDictionaryDetail;
import cn.lzj.system.mapper.SystemDictionaryDetailMapper;
import cn.lzj.system.service.ISystemDictionaryDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author SystemDictionaryDetailImpl
 */
@Service
public class SystemDictionaryDetailImpl extends BaseServiceImpl<SystemDictionaryDetail> implements ISystemDictionaryDetailService {

    @Autowired
    private SystemDictionaryDetailMapper systemDictionaryDetailMapper;
    @Override
    public void add(SystemDictionaryDetail systemDictionaryDetail) {
        systemDictionaryDetail.setTypes_id((systemDictionaryDetail.getType().getId()));
        systemDictionaryDetailMapper.save(systemDictionaryDetail);
    }

    @Override
    public void update(SystemDictionaryDetail systemDictionaryDetail) {
        systemDictionaryDetail.setTypes_id((systemDictionaryDetail.getType().getId()));
        systemDictionaryDetailMapper.update(systemDictionaryDetail);
    }
}
